{% extends "base.html" %}
{% block content %}
<div class="panel-body layer_details">
    <div class="row">
        <div class="col-md-4">
            <span class="glyphicon glyphicon-align-left text-success"></span>
            <translate class="key">Total Layers Printed</translate>
            <div class="val">{{tstat.TotalLayers}}</div>
            <br>

            <span class="glyphicon glyphicon-time text-success"></span>
            <translate class="key">Total Plates Printed</translate>
            <div class="val">{{tstat.TotalPlatePrints}}</div>
            <br>
        </div>

        <div class="col-md-4">
            <span class="glyphicon glyphicon-resize-vertical text-success"></span>
            <translate class="key">Total Cure Time</translate>
            <div class="val">{{tstat.TotalCureTime}}</div>
            <br>

            <span class="glyphicon glyphicon-hourglass text-success"></span>
            <translate class="key">Total Print Time</translate>
            <div class="val">{{tstat.TotalPrintTime}}</div>
            <br>
        </div>
        <div class="col-md-4">
            {% if os=="linux" %}
            <table id="stat">
                <tr>
                    <td width="60px" translate>CPU</td>
                    <td width="40px" id="proc">{{stat.Proc}}</td>
                    <td width="60px" translate>Proc</td>
                    <td width="40px" id="proc_numb">{{stat.ProcNumb}}</td>
                    <td width="60px" translate>Temp</td>
                    <td width="40px" id="temp">{{stat.Temp}}</td>
                </tr>
                <tr>
                    <td colspan=2 id="proc_chart" class="spark"><canvas></canvas></td>
                    <td colspan=2 id="proc_numb_chart" class="spark"><canvas></canvas></td>
                    <td colspan=2 id="temp_chart" class="spark"><canvas></canvas></td>
                </tr>
                <tr>
                    <td translate>Disk</td>
                    <td id="disk">{{stat.Disk}}</td>
                    <td translate>Memory</td>
                    <td id="mem">{{stat.Mem}}</td>
                    <td translate>Uptime</td>
                    <td id="uptime">{{stat.Up}}</td>
                </tr>
                <tr>
                    <td colspan=2 id="disk_chart" class="spark"><canvas></canvas></td>
                    <td colspan=2 id="mem_chart" class="spark"><canvas></canvas></td>
                    <td colspan=2 id="" class="spark"><canvas></canvas></td>
                </tr>
                <tr>
                    <td translate>Resin</td>
                    <td id="resin"></td>
                </tr>
                <tr>
                    <td colspan=2 id="resin_chart" class="spark"><canvas></canvas></td>
                </tr>
                <tr><td><br><br></td></tr>
            </table>
            {% endif %}
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-12">
        {% for mat in consumables %}
        <h5>{{mat.Title}} <a class="btn small btn-danger" href="/setup/custom-consumables/reset/{{mat.Name}}" data-confirm="confirm-reset">Reset</a></h5>
        <translate class="hide" id="confirm-cancel">Are you sure you have changed the consumable?</translate>
        <div class="progress progress-striped">
            <div style="width: {{mat.Usage}}%" class="progress-bar progress-bar-warning"></div>
        </div>
        {% endfor %}
    </div>
    <div class="col-md-12 {% if power||disk||heat||swap||space||storage %}alert alert-danger{% endif %}">
        {% if power %}<translate>Power issue detected. It is serious issue that may cause random problems during printing.</translate><br>{% endif%}
        {% if disk %}<translate>Storage corruption detected. Storage should get repaired.</translate><br>{% endif%}
        {% if heat %}<translate>Heating start causing performance degrade and slow down.</translate><br>{% endif%}
        {% if swap %}<translate>Memory swap detected it will slow down operations.</translate><br>{% endif%}
        {% if space %}<translate>Not enough free disk space. Try removing some plates or expand disk space.</translate><br>{% endif%}
        {% if storage %}<translate>Storage does not work as expected.</translate><br>{% endif%}
    </div>
    <div id="console_wrapper">
        <div id="console">
            <table class="search_target table table-striped table-hover">
                <tr>
                    <th translate>Level</th>
                    <th translate>Layer</th>
                    <th translate>Time</th>
                    <th translate>Module</th>
                    <th translate>Details</th>
                </tr>
            </table>
        </div>
    </div>
    <br>
</div>
{% endblock %}